# print(type(123))
# print(type("123"))

# import types

# print(type(123) == int)
# print(type("string") == str)

# def fn():
# 	pass

# print(type(fn) == types.FunctionType)
# print(type(lambda x:x) == types.LambdaType)

# str_builtin_funs = dir(str)
# print(str_builtin_funs)

# s1 = "sa shi si sai so"
# print(len(s1))
# print(s1.__len__())

class MyDog(object):
	def __init__(self):
		self.height = 100

	def __len__(self):
		return 10

# print("MyDog len:", len(MyDog()))

# arr = s1.split(" ")
# print(arr)

dog = MyDog()
print(hasattr(dog,"height"))
print("has weight:", hasattr(dog, "weight"))
print("getattr height:", getattr(dog,"weight",404))
print(setattr(dog,"weight", 1000))
print("getattr height:", getattr(dog,"weight",404))
